PROJECT(jolfs)

INCLUDE(FindPkgConfig)

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

# Detect fuse library
PKG_CHECK_MODULES(FUSE REQUIRED "fuse >= 2.6")

# Add CFLAGS
ADD_DEFINITIONS(${FUSE_CFLAGS})
ADD_DEFINITIONS(-Wall -W)

# Include the directoris
INCLUDE_DIRECTORIES(include)
INCLUDE_DIRECTORIES(${FUSE_INCLUDE_DIRS})

# Libs
LINK_DIRECTORIES(${FUSE_LDFLAGS})

SET(JOLFS_HEADERS
  include/jolfs/inode.h
  include/jolfs/types.h
  include/jolfs/volume.h
  include/jolfs/master_volume.h
  include/jolfs/fuse_volume.h
)

SET(JOLFS_CPPS
  ${JOLFS_HEADERS}

  src/inode.cpp
  src/master_volume.cpp
  src/fuse_volume.cpp
)

ADD_LIBRARY(jolfs
  ${JOLFS_CPPS}
)

# Add subdirectory
ADD_SUBDIRECTORY(test)
